<div class="crayons-card p-6 mb-6">
  <h2 class="crayons-subtitle-1 mb-4">General Purpose URL Purge</h2>
  <p class="mb-2">For a page that should 404. This will purge the page via Fastly.</p>
  <p class="mb-6">Use the full path (<%= app_url("xyz") %>) or the relative path: (/xyz)</p>
  <%= form_tag bust_cache_admin_tools_path do %>
    <div class="crayons-field">
      <%= label_tag :dead_link, "Link:", class: "crayons-field__label" %>
      <%= text_field_tag :dead_link, nil, placeholder: "/xyz", class: "crayons-textfield" %>
      <%= submit_tag :"Clear Cache", class: "crayons-btn mr-auto" %>
    </div>
  <% end %>
</div>

<div class="crayons-card p-6 mb-6">
  <h2 class="crayons-subtitle-1 mb-4">Bust Cache For Specific Content</h2>
  <p class="mb-6">This clears both the Rails cache & the Fastly cache.</p>
  <%= form_tag bust_cache_admin_tools_path do %>
    <div class="crayons-field">
      <%= label_tag :bust_article, "Article ID:", class: "crayons-field__label" %>
      <%= text_field_tag :bust_article, nil, placeholder: "12345", class: "crayons-textfield" %>
      <%= submit_tag :"Clear Article Cache", class: "crayons-btn mr-auto" %>
    </div>
  <% end %>
  <%= form_tag bust_cache_admin_tools_path do %>
    <div class="crayons-field mt-6">
      <%= label_tag :bust_user, "User ID:", class: "crayons-field__label" %>
      <%= text_field_tag :bust_user, nil, placeholder: "12345", class: "crayons-textfield" %>
      <%= submit_tag :"Clear User Cache", class: "crayons-btn mr-auto" %>
    </div>
  <% end %>
</div>

<%= render "admin/shared/image_uploader" %>
